package com.dyna.controller;

import com.dyna.domain.resp.R;
import com.dyna.service.SysNotifyMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "我的站内信")
@RestController
@AllArgsConstructor
@RequestMapping("/get-unread-count")
public class SysNoticeMsgController {

    private final SysNotifyMessageService notifyMessageService;

    @GetMapping("/get-unread-count")
    @ApiOperation(value = "获得当前用户的未读站内信数量")
    public R<Long> getUnreadNotifyMessageCount() {
        return R.data(notifyMessageService.getUnreadNotifyMessageCount());
    }


}
